package com.david.nacos.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author David
 * @version V1.0
 * @Package com.david.nacos.config
 * @date 2021/5/16 19:19
 */
@RestController
@RequestMapping("/consumer")
@RefreshScope
public class ConfigController {

    @Value(value = "${david.test}")
    private String test;

    @RequestMapping("/config")
    public String getConfig(){
        return test;
    }

}
